package section8;
interface Face1{
    static final double PI=3.14;
    abstract double area();
}
interface Face2{
    abstract void setColor(String c);
}
interface Face3 extends Face1,Face2{
    abstract void volume();
}
class CyLinder8_12 implements Face3{
    private double radius;
    private int height;
    protected String color;
    public CyLinder8_12(double r,int h){
        radius=r;
        height=h;
    }

    @Override
    public double area() {
        return PI*radius*radius;
    }

    @Override
    public void volume() {
        System.out.println("圆柱体的体积="+area()*height);
    }
    public void setColor(String c){
        color=c;
        System.out.println("颜色:"+color);
    }
}
public class App8_12 {
    public static void main(String[] args) {
        CyLinder8_12 volu=new CyLinder8_12(3.0,5);
        volu.setColor("红色");
        volu.volume();
    }
}
